<template>
	<view class="body">
		<view class="content">
			<view class="tips">若你忘记了密码，可在此重置新密码。</view>
			<input class="ipt" type="text" v-model="phone" placeholder="请输入手机号" />
			<input class="ipt" type="text" v-model="pwd" placeholder="请输入密码" />
			<input class="ipt" type="text" v-model="vercode" placeholder="请输入验证码" />
			<view class="btn" @tap="click">重置密码</view>
		</view>
		
	</view>
</template>

<script>
	import {
		resetPassword
	} from "../../../api/my/index.js"
	export default {
		data() {
			return {
				phone:'',
				pwd:'',
				vercode:''
			};
		},
		methods:{
			click(){
				resetPassword(this.phone).then(res=>{
					if(res.success == true){
						uni.showToast({
							title:"修改成功"
						})
						setTimeout(()=>{
							uni.navigateTo({
								url:"../login/login"
							})
						},1000)
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.body {
		height: 100vh;
		background-color: #f1ece7;
	}

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 0 35px;

		.tips {
			font-size: 14px;
			margin-top: 32px;
			margin-left: 24px;
			color: #999;
		}
		.ipt{
			width: 80%;
			height: 18px;
			padding: 16px;
			margin: 12px auto;
			font-size: 14px;
			border-radius: 35px;
			color: #333;
			border: none;
			box-shadow: 0 0 30px 0 rgba(43,86,112,.1);
		}
		.btn{
			width: 300px;
			height: 50px;
			line-height: 50px;
			text-align: center;
			margin: 48px auto;
			background: rgb(53, 78, 68);
			color: #fff;
			font-size: 15px;
			border-radius: 30px;
		}
	}
</style>
